/*
 * @Author: wei_jt@ecidi.com
 * @Date: 2020-07-07 14:05:26
 * @LastEditors: wei_jt@ecidi.com
 * @LastEditTime: 2020-09-26 14:38:01
 * @Description: 门户
 */
import request from '@/utils/request'
//获取门户树
export function getPortals() {
  return request({
    url: '/sys-user/portals/tree',
    method: 'get'
  })
}
//获取门户信息
export function getPortalById(id) {
  return request({
    url: '/sys-user/portal',
    method: 'get',
    params: {
      id
    }
  })
}

//新增
export function addPortal(data) {
  return request({
    url: '/sys-user/portal',
    method: 'post',
    data: data,
  })
}

//修改
export function modifyPortal(data) {
  return request({
    url: '/sys-user/portal',
    method: 'put',
    data: data,
  })
}

//删除
export function deletePortal(id) {
  return request({
    url: '/sys-user/portal',
    method: 'delete',
    params: { id }
  })
}

//删除
export function getPortalUsers(params) {
  return request({
    url: '/sys-user/portal/users/page',
    method: 'get',
    params: params
  })
}